package com.huilan.hgt.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.huilan.hgt.base.BaseModel;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 附件表
 * </p>
 *
 * @author ghy
 * @since 2018-11-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("T_ATTACHMENT")
public class Attachment extends BaseModel<Attachment> {

    private static final long serialVersionUID = 1L;

    /**
     * 附件ID
     */
    @TableId(value = "ATTACHMENT_ID", type = IdType.AUTO)
    private Integer attachmentId;

    /**
     * 附件编号
     */
    @TableField("ATTACHMENT_CODE")
    private String attachmentCode;

    /**
     * 附件名称
     */
    @TableField("ATTACHMENT_NAME")
    private String attachmentName;


    /**
     * 附件路径
     */
    @TableField("ATTACHMENT_PATH")
    private String attachmentPath;

    /**
     * 附件大小
     */
    @TableField("ATTACHMENT_SIZE")
    private String attachmentSize;


    /**
     * 附件大小
     */
    @TableField(exist = false)
    private String catalogueName;


    public static final String ATTACHMENT_ID = "ATTACHMENT_ID";

    public static final String ATTACHMENT_CODE = "ATTACHMENT_CODE";

    public static final String ATTACHMENT_NAME = "ATTACHMENT_NAME";

    public static final String ATTACHMENT_SIZE = "ATTACHMENT_SIZE";

    public static final String ATTACHMENT_PATH = "ATTACHMENT_PATH";

    @Override
    protected Serializable pkVal() {
        return this.attachmentId;
    }

}
